import React, { useState ,useEffect } from 'react';
import { Button, Checkbox, Form, Input, DatePicker, Space, Select } from 'antd';
import "./Guanli.scss"
import Banshi_List from "../../../components/Response列表/Banshi_list"
import { useNavigate } from 'react-router-dom'
import * as service from "../../../api/index"
interface Props {

}
function Guanli(props: Props) {

  
    var navigate = useNavigate();
    const { Option } = Select;
    type SizeType = Parameters<typeof Form>[0]['size'];
    const onFinish = (values: any) => {
        console.log('Success:', values);
    };
    const { RangePicker } = DatePicker;
    const onFinishFailed = (errorInfo: any) => {
        console.log('Failed:', errorInfo);
    };
    const [form] = Form.useForm();
    const onGenderChange = (value: string) => {
        switch (value) {
            case 'male':
                form.setFieldsValue({ note: 'Hi, man!' });
                break;
            case 'female':
                form.setFieldsValue({ note: 'Hi, lady!' });
                break;
            case 'other':
                form.setFieldsValue({ note: 'Hi there!' });
                break;
            default:
        }
    };

   
    return (
        <div className='Guanli'>
            <div className='biaodan'>
                <Form
                    name="basic"
                    // labelCol={{ span: 8 }}
                    // wrapperCol={{ span: 16 }}

                    initialValues={{ remember: true }}
                    onFinish={onFinish}
                    onFinishFailed={onFinishFailed}
                    autoComplete="off"
                >
                    <Form.Item
                        label="评价事项"
                        name="shixiang"
                        rules={[{ required: true, message: '请填写评价事项' }]}
                    >
                        <Input />
                    </Form.Item>
                    <Form.Item
                        label="事项编码"
                        name="bianma"
                        rules={[{ required: true, message: '请填写事项编码' }]}
                    >
                        <Input />
                    </Form.Item>
                    <Form.Item
                        label="评价人姓名"
                        name="name"
                        rules={[{ required: true, message: '请填写评价人姓名' }]}
                    >
                        <Input />
                    </Form.Item>
                    <Form.Item name="gender" label="评价结果" rules={[{ required: true }]}>
                        <Select
                            placeholder="请选择"
                            onChange={onGenderChange}
                            allowClear
                        >
                            <Option value="one">非常不满意</Option>
                            <Option value="two">不满意</Option>
                            <Option value="there">满意</Option>
                            <Option value="four">非常满意</Option>
                        </Select>
                    </Form.Item>
                    <Form.Item name="time" label="办事时间">
                        <RangePicker />
                    </Form.Item>
                    <Form.Item wrapperCol={{ offset: 8, span: 16 }}>
                        <Button type="primary" htmlType="submit">
                            查询
                        </Button>
                        <Button type="primary" htmlType="submit">
                            重置
                        </Button>
                    </Form.Item>
                </Form>

            </div>
            <div>
              
                <Banshi_List />
            </div>

        </div>
    );
}

export default Guanli;